import service from './request'

const baseURL = 'https://www.fastmock.site/mock/ae8e9031947a302fed5f92425995aa19/jd'

export function getData (params) {
  return service({
    method: 'get',
    url: `${baseURL}/api/shop/hot-list`,
    params
  })
}

export function post (data) {
  return service({
    method: 'get',
    url: `${baseURL}`,
    data,
    headers: { 'Content-Type': 'application/json' }
  })
}

export function getShopItem (id) {
  return service({
    method: 'get',
    url: `${baseURL}/api/shop/${id}`
  })
}

export function getContentData (id, params) {
  return service({
    method: 'get',
    url: `${baseURL}/api/shop/${id}/products`,
    params: { tab: params }
  })
}
